export const processInfoDetail = (param) => window.ajaxFlowApi.request(`/v1/process/open/config/detail`, 'get', param, { showLoading: true })// 流程详情

// 流程图表
export const processFlowInfo = (param) => window.ajaxFlowApi.request(`/v1/process/line/config/selectFlowChartInfo`, 'get', param, { showLoading: true })
export const processLineInsert = (param) => window.ajaxFlowApi.request(`/v1/process/line/config/insert`, 'post', param, { showLoading: true })
export const processLineUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/line/config/update`, 'post', param, { showLoading: true })
export const processLineDelete = (param) => window.ajaxFlowApi.request(`/v1/process/line/config/delete`, 'get', param, { showLoading: true })
export const processNodeInsert = (param) => window.ajaxFlowApi.request(`/v1/process/node/config/insert`, 'post', param, { showLoading: true })
export const processNodeUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/node/config/update`, 'post', param, { showLoading: true })
export const processNodeDelete = (param) => window.ajaxFlowApi.request(`/v1/process/node/config/delete`, 'get', param, { showLoading: true })


// 审批人员配置
export const processAuditorsInster = (param) => window.ajaxFlowApi.request(`/v1/process/auditors/config/insert`, 'post', param, { showLoading: true })
export const processAuditorsUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/auditors/config/update`, 'post', param, { showLoading: true })
export const processAuditorsDelete = (param) => window.ajaxFlowApi.request(`/v1/process/auditors/config/delete`, 'get', param, { showLoading: true })
export const processAuditorsList = (param) => window.ajaxFlowApi.request(`/v1/process/auditors/config/list`, 'post', param, { showLoading: true })



// 审批规则配置
export const processRuleInsert = (param) => window.ajaxFlowApi.request(`/v1/process/rule/config/insert`, 'post', param, { showLoading: true })
export const processRuleDelete = (param) => window.ajaxFlowApi.request(`/v1/process/rule/config/delete`, 'post', param, { showLoading: true })
export const processRuleList = (param) => window.ajaxFlowApi.request(`/v1/process/rule/config/list`, 'get', param, { showLoading: true })
export const processRuleMap = (param) => window.ajaxFlowApi.request(`/v1/processRuleDictionary/getByprocessName`, 'get', param, { showLoading: true })

export const selUser = (param) => window.ajaxFlowApi.request(`/v1/user/selUser`, 'post', param, { showLoading: true })

//获取关联key
export const processGenerateKey = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/generateKey`, 'post', param, { showLoading: false })


// 保存表单
export const procConfigCreate = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/create`, 'post',param, { showLoading: true })
// 表单详情
export const procConfigsDetail = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/detail`, 'post',param, { showLoading: true })
// 表单详情
export const procConfigsDelete = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/delete`, 'post',param, { showLoading: true })
// 更新表单
export const procConfigsUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/update`, 'post',param, { showLoading: true })
// 结构模糊查询
export const procConfigsTructList = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/structList`, 'post',param, { showLoading: false })
// 关联表单模糊
export const procConfigsFormList = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/formList`, 'post',param, { showLoading: false })
// 流程列表
export const procConfigsList = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/list`, 'post',param, { showLoading: true })
export const procConfigsClone = (param) => window.ajaxFlowApi.request(`/v1/process/procConfig/model/clone`, 'post',param, { showLoading: true })


// 流程节点详情
export const processDetail = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/processDetail`, 'post', param, { showLoading: true })
// 流程节点更新
export const processUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/updateProcess`, 'post', param, { showLoading: true })
// 保存流程节点
export const processSaveWorkFlow = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/saveWorkFlow`, 'post', param, { showLoading: true })
// 查询审批组织
export const approvalOrganize = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/approvalOrganize`, 'post', param, { showLoading: false })
// 生成关联key
export const generateKey = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/generateKey`, 'post', param, { showLoading: false })
// 查询条件类型
export const processConditionValueList = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeCondition/model/conditionValueList`, 'post', param, { showLoading: false })
// 查询表单条件
export const processFormConditionList = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeCondition/model/formConditionList`, 'post', param, { showLoading: false })

//授权管理
export const impowerList = (param) => window.ajaxFlowApi.request(`/v1/process/auditorsAuth/list`, 'post', param, { showLoading: true })
export const impowerCreate = (param) => window.ajaxFlowApi.request(`/v1/process/auditorsAuth/create`, 'post', param, { showLoading: true })
export const impowerUpdate = (param) => window.ajaxFlowApi.request(`/v1/process/auditorsAuth/update`, 'post', param, { showLoading: true })
export const impowerDelete = (param) => window.ajaxFlowApi.request(`/v1/process/auditorsAuth/delete`, 'post', param, { showLoading: true })
export const getUsers = (param) => window.ajaxFlowApi.request(`/v1/user/selUser.json`, 'post', param, { showLoading: true })

//去流程节点
export const getNodeCode = (param) => window.ajaxFlowApi.request(`/v1/process/procNodeConfig/model/procNodeList`, 'post', param, { showLoading: true })

//选人
export const apiGetRoleList = (param) => window.ajaxFlowApi.request(`/v1/roles.json`, 'get', '', { showLoading: true })
export const apiGetGuys = (param) => window.ajaxFlowApi.request(`/v1/business/employee/employeeList`, 'post', param, { showLoading: true })

//表单相关
export const apiFormCreate = (param) => window.ajaxFlowApi.request(`/v1/fms/form`, 'post', param, { showLoading: true })
export const apiFormUpdate = (param) => window.ajaxFlowApi.request(`/v1/fms/form`, 'put', param, { showLoading: true })
export const apiFormDetail = (param) => window.ajaxFlowApi.request(`/v1/fms/form/${param}`, 'get', '', { showLoading: true })
export const apiFormDelete = (param) => window.ajaxFlowApi.request(`/v1/fms/form/${param}`, 'delete', '', { showLoading: true })
export const apiFormList = (param) => window.ajaxFlowApi.request(`/v1/fms/form/list`, 'post', param, { showLoading: true })

export const formItemCreate = (param) => window.ajaxFlowApi.request(`/v1/fms/item`, 'post', param, { showLoading: true })
export const formItemUpdate = (param) => window.ajaxFlowApi.request(`/v1/fms/item`, 'put', param, { showLoading: true })
export const formItemDetail = (param) => window.ajaxFlowApi.request(`/v1/fms/item/${param}`, 'get', '', { showLoading: true })
export const formItemDelete = (param) => window.ajaxFlowApi.request(`/v1/fms/item/${param}`, 'delete', '', { showLoading: true })
export const formItemList = (param) => window.ajaxFlowApi.request(`/v1/fms/item/list`, 'post', param, { showLoading: true })
export const formItemMobileList = (param) => window.ajaxFlowApi.request(`/v1/fms/item/mobileStyle`, 'post', param, { showLoading: true })
export const formItemWebList = (param) => window.ajaxFlowApi.request(`/v1/fms/item/webStyle`, 'post', param, { showLoading: true })
export const formItemlayoutMobileCreate = (param) => window.ajaxFlowApi.request(`/v1/fms/layout/mobile`, 'post', param, { showLoading: true })
export const formItemlayoutWebCreate = (param) => window.ajaxFlowApi.request(`/v1/fms/layout/web`, 'post', param, { showLoading: true })

export const ajaxAppList = (param) => window.ajaxFlowApi.request('/v1/applications/list', 'post', param, { showLoading: true })
export const getChildForm = (param) => window.ajaxFlowApi.request('/v1/fms/form/child', 'post', param, { showLoading: true })

//权限相关
export const flowRuleList = (param) => window.ajaxFlowApi.request(`/v1/process/auth/list`, 'post',param, { showLoading: true })
export const flowRuleAdd = (param) => window.ajaxFlowApi.request(`/v1/process/auth/create`, 'post',param, { showLoading: true })
export const flowRuleUpdate= (param) => window.ajaxFlowApi.request(`/v1/process/auth/update`, 'post',param, { showLoading: true })
export const flowRuleDelete = (param) => window.ajaxFlowApi.request(`/v1/process/auth/delete?id=${param}`, 'get',param, { showLoading: true })
export const flowRuleDetail = (param) => window.ajaxFlowApi.request(`/v1/process/auth/detail?id=${param}`, 'get',param, { showLoading: true })

//查询企业
export const getFirmListByName = (param) => window.ajaxFlowApi.request(`/v1/business/organization/node/list`, 'post',param, { showLoading: true })
//已经关联流程的企业
export const apiGetFirmList = (param) => window.ajaxFlowApi.request(`/v1/business/organization/node/enterprise`, 'get','', { showLoading: true })
//已经关联流程的企业
export const apiFormClone = (param) => window.ajaxFlowApi.request(`/v1/fms/form/module/clone?formKey=${param}`, 'get','', { showLoading: true })

// 表单版本list
export const apiVersionList = (param) => window.ajaxFlowApi.request(`/v1/fms/version/list`, 'post', param, { showLoading: true })
// 表单版本list
export const apiVersionAdd = (param) => window.ajaxFlowApi.request(`/v1/fms/version/generate`, 'post', param, { showLoading: true })


//抄送管理新增
export const apiCcManageAdd= (param) => window.ajaxFlowApi.request(`/v1/business/task`, 'post', param, { showLoading: true })
//抄送管理列表
export const apiCcManageList= (param) => window.ajaxFlowApi.request(`/v1/business/task/list`, 'post', param, { showLoading: true })
//抄送管理列表删除
export const apiCcManageListDelect = (param) => window.ajaxFlowApi.request(`/v1/business/task/${param}`, 'delete', '', { showLoading: true })
//抄送管理详情
export const apiCcManageDetail = (param) => window.ajaxFlowApi.request(`/v1/business/task/${param}`, 'get', '', { showLoading: true })
//抄送管理修改
export const apiCcManageUpdate = (param) => window.ajaxFlowApi.request(`/v1/business/task`, 'put', param, { showLoading: true })

export const apiRoleList = (primaryKey) => window.ajaxFlowApi.request(`/v1/business/task/role/list`, 'get', '', { showLoading: true });

// 获取指定字典
export const getDictionaryTypes = (param) => window.ajaxFlowApi.request('/v1/constant', 'get', param, {showLoading: false})

// 获取地址
export const select = (type, key) => window.ajaxFlowApi.request(`/v1/position${type ? '/' + type : ''}${key ? '/' + key : ''}`, 'get', {}, {showLoading: true})

// 获取字典表Map变量
export let dictionaryMap = (params = '') => window.ajaxFlowApi.request('/v1/constant/item', 'get', {}, { showLoading: true })

// 翻译
export let translate = (params = '') => window.ajaxFlowApi.request('/v1/api/trans/vip/translate?' + params, 'get', {}, { showLoading: true })

export const dictionaryConstants = () => window.ajaxFlowApi.request('/v1/business/dictionary/info/constants', 'post', {}, {showLoading: false})